<template>
  <el-row class="tac">
  <el-col :span="12">
    <h5>自定义颜色</h5>
    <el-menu
      default-active="2"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      router
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>导航一</span>
        </template>
        <el-menu-item-group>
          <template slot="title">主要</template>
          <el-menu-item index="/router-practise/about">关于</el-menu-item>
          <el-menu-item index="/router-practise/home">家庭</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-menu-item index="/router-practise/category">
        <i class="el-icon-menu"></i>
        <span slot="title">分类</span>
      </el-menu-item>

    </el-menu>
  </el-col>
</el-row>
</template>

<script>
export default {
  name: 'navigation',
  data() {
    return {

    }
  },
  methods: {
    handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
  },
}
</script>

<style>

</style>
